package com.springboot.mall.model.mappers;

import com.springboot.mall.model.entity.Cart;
import com.springboot.mall.model.vo.CartVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CartMapper {
    Cart selectCartByUserIdAndProductId(@Param("userId") Integer userId,@Param("productId") Integer productId);
    int insertSelective(Cart record);
    int updateByPrimaryKeySelective(Cart record);
    List<CartVO> selectList(@Param("userId") Integer userId);
    int deleteByPrimaryKey(Integer id);
    int updateSelectedOne(@Param("userId")Integer userId,@Param("productId")Integer productId,@Param("selected")Integer selected);


}
